<template>
    <div>
        <TypeNav/>
        <!-- 轮播加右列表 -->
        <ListContainer/>
        <!-- 今日推荐 -->
        <TodayRecommend/>
        <!-- 商品排行 -->
        <Rank />
        <!-- 猜你喜欢 -->
        <Like />
        <!-- 楼层 -->
        <Floor v-for="item in floors" :item="item" :key="item.id"/>
        
        <Brand />
    </div>
</template>

<script>
import { mapActions, mapState } from 'vuex'
import ListContainer from "./ListContainer/ListContainer.vue"
import TodayRecommend from "./TodayRecommend/TodayRecommend.vue"
import Rank from "./Rank/Rank.vue"
import Floor from "./Floor/Floor.vue"
import Brand from "./Brand/Brand.vue"
import Like from "./Like/Like.vue"
    export default {
        name:"Home",
        components:{
            ListContainer,
            TodayRecommend,
            Rank,
            Floor,
            Brand,
            Like
        },
        computed:{...mapState("home",["floors"])},
        methods:{
            ...mapActions("home",["getFloors"])
        },
        mounted(){
            this.getFloors()
        },
    }
</script>

<style lang="less" scoped>

</style>